﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using XFControls.XFPanels.XFPanelItems;

namespace XFControls.XFPanels.XFPanelModals
{
    public enum XFModalState
    {
        Closed,
        Expanding,
        Collapsing,
        Open
    }

    public enum XFModalClickResult
    {
        Yes,
        No,
        Cancel
    }

    public class ModalEventArgs : EventArgs
    {
        public XFModalClickResult Results { get; private set; }

        public ModalEventArgs(XFModalClickResult results)
        {
            Results = results;
        }
    }
    public delegate void ModalEventHandler(object sender, ModalEventArgs e);

    public interface IXFModal : IDisposable
    {
        event ModalEventHandler OnSuccessAction;
        XFPanelBase Parent { get; set; }
        XFModalState State { get; set; }
        Bitmap Buffer { get; set; }
        int CurHeight { get; set; }
        XFItemStyle Style { get; set; }

        int GetHeight();
        void ResetHeight();
        void ItemPaint(Graphics g, int x, int y);
        void SendClick(int x, int y);
        void ClearClick();
        XFModalClickResult GetClickResult();
    }

    public interface IXFModalReceiveMouse : IXFModal
    {
        void SendMouseMove(int x, int y);
        void SendMouseUp(int x, int y);
    }

    public interface IXFModelButton : IDisposable
    {
        string Text { get; set; }
        bool Selected { get; set; }
        XFItemStyle Style { get; set; }

        int GetHeight();
        void ResetHeight();
        XFModalClickResult GetClickResult();
        void ItemPaint(Graphics g, int x, int y);
    }
}
